﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WebSvrUpdaterCore.Models
{
    public class AppPoolModel
    {
        /// <summary>
        /// 程序池名称
        /// </summary>
        public string Name { get; set; }

        public int Status { get; set; }

        public int StartMode { get; set; } = 0;

        public int ManagedPipelineMode { get; set; } = 0;

        public string ManagedRuntimeVersion { get; set; } = "v2.0";

        public bool Enable32BitAppOnWin64 { get; set; } = false;

        public long QueueLength { get; set; } = 1000;

        public bool AutoStart { get; set; } = true;

        public AppPoolIdentity Identity { get; set; }
    }

    public class AppPoolIdentity
    {
        /// <summary>
        /// 应用程序池标识
        /// LocalSystem = 0, LocalService = 1, NetworkService = 2, SpecificUser = 3, ApplicationPoolIdentity = 4
        /// </summary>
        public int IdentityType { get; set; } = 4;

        /// <summary>
        /// Windows系统用户名
        /// 当IdentityType值为4时，指定程序池运行的账户
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// 加载用户配置文件
        /// </summary>
        public bool LoadUserProfile { get; set; } = true;


    }
}
